home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_Custom / Report.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-20  |  903 b   |  39 lines

  1. //------------------------------------------------------------------------
  2. //
  3. //  report.cc  --  Custom Control Library for Reports
  4. //
  5. //  PageNumber - Text control showing the current page number.
  6. //
  7. //  Visual dBASE Samples Group 
  8. //  $Revision:   1.4  $
  9. //
  10. //  Copyright (c) 1997, Borland International, Inc. 
  11. //  All rights reserved.
  12. //
  13. //------------------------------------------------------------------------
  14. // 
  15.  
  16. class pageNumber(ParentObj) of Text(ParentObj) custom 
  17.    SET TALK OFF
  18.    with ( this )
  19.       height   := 200
  20.       width    := 1000
  21.       metric   := 1
  22.       fontSize := 8
  23.       text     := class::pageValue
  24.    endwith
  25.  
  26.    function pageValue 
  27.       // returns 0 if placed on form
  28.       local nPage
  29.       nPage = 0
  30.       if TYPE("this.form.reportPage") == "N" 
  31.          nPage := this.form.reportPage
  32.       endif
  33.    return ( nPage )
  34.  
  35. endclass
  36.  
  37.  
  38.  
  39.